import request from '@/utils/request'

export function getProductData(class_id = '', orderBy, page, per_page = 10, area, product_type = 'ym') {
  if (area) {
    return request({
      url: `/product`,
      method: 'get',
      params: {
        class_id,
        orderBy,
        area,
        page,
        per_page,
        product_type
      }
    })
  } else {
    return request({
      url: `/product`,
      method: 'get',
      params: {
        class_id,
        orderBy,
        page,
        per_page,
        product_type
      }
    })
  }
}
